home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 63142 / 63142.xpi / chrome / content / overlay.js < prev    next >
Text File  |  2010-01-25  |  2KB  |  44 lines

  1. var ketkpin = {
  2.   onLoad: function() {
  3.     // initialization code
  4.     this.initialized = true;
  5.     this.strings = document.getElementById("ketkpin-strings");
  6.   },
  7.  
  8.   onMenuItemCommand: function(e) {
  9.       this.my_url=window.content.location.href;
  10.       //alert(my_url);
  11.       window.content.location.href="http://ketkp.in/?url="+escape(this.my_url);
  12.      // window.location="http://ketkp.in/index-exp.php?url="+escape(myurl);
  13.   },
  14.  onMenuItemCommand2: function(e) {
  15.       this.my_url=window.content.location.href;
  16.       this.my_custom=prompt("Masukkan Nama TKP yang di inginkan (contoh: url_imut69)");
  17.       //alert(my_custom);
  18.       if(this.my_custom.length>0){
  19.           window.content.location.href="http://ketkp.in/?url="+escape(this.my_url)+"&custom_name="+escape(this.my_custom);
  20.          // window.location="http://ketkp.in/index-exp.php?url="+escape(myurl);
  21.       }
  22.   },
  23.   onMenuItemCommand3: function(e) {
  24.       this.my_url=gContextMenu.getLinkURL();
  25.       window.content.location.href="http://ketkp.in/?url="+escape(this.my_url);
  26.   },
  27.  
  28.   onMenuItemCommand4: function(e) {
  29.       this.my_url=gContextMenu.getLinkURL();
  30.       this.my_custom=prompt("Masukkan Nama TKP yang di inginkan (contoh: url_imut69)");
  31.       if(this.my_custom.length>0){
  32.           window.content.location.href="http://ketkp.in/?url="+escape(this.my_url)+"&custom_name="+escape(this.my_custom);
  33.          // window.location="http://ketkp.in/index-exp.php?url="+escape(myurl);
  34.       }
  35.   },
  36.  
  37.   onToolbarButtonCommand: function(e) {
  38.     // just reuse the function above.  you can change this, obviously!
  39.     ketkpin.onMenuItemCommand(e);
  40.   }
  41. };
  42.  
  43. window.addEventListener("load", ketkpin.onLoad, false);
  44.